$(".searchstockbtn").on('click',function () {
    var searchmethod=$("select").val();
    var input=$(".searchstock").val().trim();
    $("body").load("http://localhost:8080/searchstock?input="+input+"&searchmethod="+searchmethod);
});

$(".returnstock").on('click',function () {

    $("body").load("http://localhost:8080/stock");

});

//上架
$(".maktablebtn").on('click',function () {
    var bookId=$(this).attr("data-id");
    $.ajax({
        type:"put",
        url: "http://localhost:8080/maktable",
        data: {"bookId":bookId},
        success:function (data) {
            if (data.status==1){
                alert(data.msg);
            }else {
                alert(data.msg);
            }
        },
        fail:function () {
            alert("服务器繁忙")
        },
        complete:function () {
        }
    })
});